package com.example.demo.service;

import com.example.demo.bean.RiskArea;
import com.example.demo.mapper.RiskAreaMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RiskAreaServiceImpl implements RiskAreaService{

    @Autowired
    private RiskAreaMapper riskAreaMapper;

    @Override
    public void addRiskArea(RiskArea riskArea) {
        riskAreaMapper.addRiskArea(riskArea);
    }

    @Override
    public void deleteRiskArea(Integer id) {
        riskAreaMapper.deleteRiskArea(id);
    }

    @Override
    public List<RiskArea> getAllRiskArea() {
        return riskAreaMapper.getAllRiskArea();
    }
}
